package model

import (

	"fmt"
)

func GetExistAdmin(name,password string) (i,n ,p string) {
	result,err:=DB.Query("select * from admin where admin_name = $1 ;",name)
	if err!=nil{
		fmt.Println("GetExistUser err:",err)
	}

	var id string
	for result.Next() {

		err = result.Scan(&id,&name,&password)
	}
	fmt.Println(id,name,password,"id,name password ")

	return id,name,password
}